<?php
/**
 * Class SQLRequest
 */
final class SQLRequest
{
	private static $maxImagesByPage = 24;
	
	private static $getAllImages = "SELECT * FROM image";
	private static $getImagesByRange = "SELECT * FROM image LIMIT ";
	  
	/**
	  * getRequest
	  * @param type the type of request
	  * @param nb the number of entries of request
	  * @provides the right request for the database
	  */
	  public static function getRequest( $type = null, $startIndex = 0 )
	  {
	  	if ( $type == "getAllImages" )
		    return self::$getAllImages;
		elseif ( $type == "getImagesByRange" )
		{
			return self::$getImagesByRange.$startIndex.",".self::$maxImagesByPage;
		}
		else
			return null;
	  }
}
?>